package com.boot.app.base.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.boot.app.base.domain.BaseMenu;
import com.boot.app.base.mapper.BaseMenuMapper;
import com.boot.app.base.service.IBaseMenuService;
import com.boot.app.base.vo.MenuInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseMenuServiceImpl extends ServiceImpl<BaseMenuMapper, BaseMenu> implements IBaseMenuService {

    private final BaseMenuMapper mapper;

    @Autowired
    public BaseMenuServiceImpl(
        BaseMenuMapper mapper
    ){
        this.mapper = mapper;
    }

    @Override
    public List<MenuInfo> fetchMenuInfo(long roleId){
        return mapper.selectMenuInfo(roleId);
    }

}
